<?php
require_once '../common/values.php';
require_once '../common/database.php';

$con = mysql_connect("localhost",$username,$password);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db($database, $con);

mysql_query("Select * From tblJobs where Closed=' ' AND Project = 'Helpdesk' ");
$result=mysql_affected_rows();
$query="INSERT INTO tblhstats VALUES('$date','$time','$result')";
mysql_query($query);
mysql_close();
?>
